package com.example.leavemanagement.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.leavemanagement.model.dto.score.AddOrDecreaseScoreRequest;
import com.example.leavemanagement.model.dto.score.QueryScoreRequest;
import com.example.leavemanagement.model.dto.score.UpdateScoreRequest;
import com.example.leavemanagement.model.entity.ScoreManage;
import com.example.leavemanagement.model.vo.Analyze.UserScoreAnalyzeVo;
import com.example.leavemanagement.model.vo.ScoreManageVo;

import javax.servlet.http.HttpServletRequest;


/**
* @author ASUS
* @description 针对表【score_manage】的数据库操作Service
* @createDate 2025-05-24 10:20:57
*/
public interface ScoreManageService extends IService<ScoreManage> {

    /**
     *
     * @param addOrDecreaseScoreRequest 添加分数请求类
     * @return
     */
    long addScore(AddOrDecreaseScoreRequest addOrDecreaseScoreRequest, HttpServletRequest request);


    /**
     *
     * @param updateScoreRequest 更新分数请求类
     * @return
     */
    boolean updateScore(UpdateScoreRequest updateScoreRequest,HttpServletRequest request);


    /**
     * 分页查询加减分
     * @param queryScoreRequest 查询分数请求类（分页）
     * @return
     */
    Page<ScoreManageVo> getScoreByPage(QueryScoreRequest queryScoreRequest,HttpServletRequest request);

    /**
     * 查询条件构造器
     * @param queryScoreRequest 查询分数请求类
     * @return
     */
    QueryWrapper<ScoreManage> getQueryWrapper(QueryScoreRequest queryScoreRequest);


    /**
     * 删除分数
     * @param scoreManage
     * @param request
     * @return
     */
    boolean deleteScoreById(ScoreManage scoreManage,HttpServletRequest request);

    /**
     * 用户分析页
     *
     * @param queryScoreRequest
     * @return
     */
    Page<UserScoreAnalyzeVo> getUserScoreAnalyzeVoByPage(QueryScoreRequest queryScoreRequest, HttpServletRequest request);


}
